//
//  Macros.h
//  ZYT
//
//  Created by 汇然 on 2018/5/3.
//  Copyright © 2018年 汇然. All rights reserved.
//

#ifndef Macros_h
#define Macros_h

#define ScreenW [UIScreen mainScreen].bounds.size.width
#define ScreenH [UIScreen mainScreen].bounds.size.height

//#define ZYTHttp @"http://192.168.1.154/dsmall/public"
#define ZYTHttp @"http://192.168.1.113/dsmall/public"
#define ZYTImgHttp @"http://47.104.176.105"
#define ZYTToken @"30AC4D0D-AF4B-9ED7-B452-7D1D6FAD2F76"

//安全区
/** navigationBar 高度 */
#define SafeAreaTopHeight ((ScreenH == 812.0 || ScreenH == 896.0) ? 88 : 64)
/** navigationBar X 间距 */
#define SafeAreaTopInterval ((ScreenH == 812.0 || ScreenH == 896.0) ? 24 : 0)
/** tabbar 高度 */
#define SafeAreaBottomView ((ScreenH == 812.0 || ScreenH == 896.0) ? 83 : 49)
/** tabbar X 间距 */
#define SafeAreaBottomHeight ((ScreenH == 812.0 || ScreenH == 896.0) ? 34 : 0)

/*
 * other safeArea method
 * #define SafeAreaTopHeight [[UIApplication sharedApplication] statusBarFrame].size.height + 44;
 */

// 1.1 Log
#ifdef DEBUG // 调试版本
#define DeLog(...) NSLog(__VA_ARGS__)
#else // 发布版本
#define DeLog(...)
#endif

//弱引用
#define WEAKSELF __weak typeof(self) weakSelf = self;

/******************    TabBar          *************/
#define MallClassKey   @"rootVCClassString"
#define MallTitleKey   @"title"
#define MallImgKey     @"imageName"
#define MallSelImgKey  @"selectedImageName"

//色值
#define RGBA(r,g,b,a) [UIColor colorWithRed:r/255.0f green:g/255.0f blue:b/255.0f alpha:a]
#define RGB(r,g,b) RGBA(r,g,b,1.0f)

#define HEXCOLOR(hex) [UIColor colorWithRed:((float)((hex & 0xFF0000) >> 16)) / 255.0 green:((float)((hex & 0xFF00) >> 8)) / 255.0 blue:((float)(hex & 0xFF)) / 255.0 alpha:1]

//全局背景色
#define ZYTBGColor RGB(243,245,247)
#define ZYTBlueColor RGB(48,62,159)
#define ZYTRedColor RGB(210,20,47)
#define ZYTBlack1Color RGB(51,51,51)
#define ZYTBlack2Color RGB(102,102,102)
#define ZYTBlack3Color RGB(153,153,153)
#define ZYTLineColor RGB(215,215,215)
#define SummerColor RGB(255,99,71)
#define AutumnColor RGB(218,165,32)
#define WinterColor RGB(70,130,180)


//字号
#define ZYT20Font [UIFont systemFontOfSize:20.0f];
#define ZYT19Font [UIFont systemFontOfSize:19.0f];
#define ZYT18Font [UIFont systemFontOfSize:18.0f];
#define ZYT17Font [UIFont systemFontOfSize:17.0f];
#define ZYT16Font [UIFont systemFontOfSize:16.0f];
#define ZYT15Font [UIFont systemFontOfSize:15.0f];
#define ZYT14Font [UIFont systemFontOfSize:14.0f];
#define ZYT13Font [UIFont systemFontOfSize:13.0f];
#define ZYT12Font [UIFont systemFontOfSize:12.0f];
#define ZYT11Font [UIFont systemFontOfSize:11.0f];
#define ZYT10Font [UIFont systemFontOfSize:10.0f];
#define ZYT9Font [UIFont systemFontOfSize:9.0f];
#define ZYT8Font [UIFont systemFontOfSize:8.0f];
#define ZYT7Font [UIFont systemFontOfSize:7.0f];

//获取当前版本号
#define BUNDLE_VERSION [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleVersion"]
//获取当前版本的biuld
#define BIULD_VERSION [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleShortVersionString"]
//获取当前设备的UDID
#define DIV_UUID [[[UIDevice currentDevice] identifierForVendor] UUIDString]

//SVProgress 显示

/* SVProgree 设置
    [SVProgressHUD setDefaultAnimationType:SVProgressHUDAnimationTypeNative];
    [SVProgressHUD setDefaultStyle:SVProgressHUDStyleDark];
    [SVProgressHUD setDefaultMaskType:SVProgressHUDMaskTypeNone];
*/

#define buildErrorSVP(str) [SVProgressHUD showErrorWithStatus:str];[SVProgressHUD dismissWithDelay:2.0f];

#define buildSuccessSVP(str) [SVProgressHUD showSuccessWithStatus:str];[SVProgressHUD dismissWithDelay:2.0f];


#endif /* Macros_h */
